<?php 
// 判断用户是否按了按钮
	if(!empty($_POST['submit'])){

		if($_POST['password'] == '123456'){
			session_start();
			$_SESSION['admin_id'] = 1;
			header('Location:admin.php');
		}
		else{
			echo '密码错误';
		}
	}
?>
<html>
<head>
	<meta charset="utf-8">
	<title>管理员登录</title>
</head>
<body>
	<form action="admin_login.php" method="post">
		<p>请输入通行证密码：<label><input type="password" name="password" /></label></p>
		<input type="submit" name="submit" value="提交数据" />
	</form>
</body>
</html>











